<template>
  <ul class="list">
    <li v-for="item in reyinglist" :key="item.id">
      <!-- 添加跳转到 内容页的链接 -->
      <router-link :to="'/item/' + item.id">
        <div class="haiBao">
          <img :src="item.img" />
        </div>
        <div class="listMid">
              <span>{{ item.nm }}</span>
              <span v-if="item.globalReleased==false"><span>{{item.wish}}</span>人想看</span>
              <span v-else>观众评：<span>{{item.sc}}</span></span>
              <span>主演：<span>{{item.star}}</span></span>
              <span v-if="item.globalReleased==false">{{item.showInfo}}</span>
              <span v-else>{{item.showInfo}}</span>
        </div>
        <div v-if="item.globalReleased==false" class="ticket">预售</div>
        <div v-else class="tickets">购票</div>
      </router-link>
    </li>
  </ul>
</template>

<script>
export default {
  name: "reying",
  props: ["reyinglist"], //获取从父组件传过来的参数
};
</script>

<style scoped>

.list li {
  width: 100%;
  height: 114px;
  margin-bottom: 10px;
}
.list li a {
  display: flex;
  justify-content: space-around;
  color: #333;
}
.list li img{
  margin-top: 6px;
}
.list li .listMid{
  border-bottom: 1px solid #777;
}
.list li .listMid span{
  display: block;
  margin-top: 6px;
}
.list li .listMid span:nth-of-type(1){
  font-size: 17px;
  color: #333;
  font-weight: 700;
}
.list li .listMid span:nth-of-type(2) span{
    color: #faaf00;
    font-size: 15px;
    font-weight: 600;
    display: inline;
}
.list li .listMid span:nth-of-type(3){
    width: 202.67px;
    text-overflow: ellipsis;
}
.list li .listMid span:nth-of-type(3) span{
    font-size: 13px;
    display: inline;
    font-weight: normal;
}
.list li .listMid span:nth-of-type(4){
    font-size: 13px;
    font-weight: normal;
}
.list li .ticket{
    width: 47px;
    height: 27px;
    font-size: 12px;
    text-align: center;
    line-height: 27px;
    background: #3c9fe6;
    border-radius: 4px;
    color: #fff;
    margin-top: 50px;
}
.list li .tickets{
    width: 47px;
    height: 27px;
    font-size: 12px;
    text-align: center;
    line-height: 27px;
    background: #f03d37;
    border-radius: 4px;
    color: #fff;
    margin-top: 50px;
}
</style>